This page holds instructions on how to compile plugins in a “standalone” environment and on how to create the plugin packages in Windows. The plugin watchdog_pi is used as an example, since this plug_in has no additional dependencies.
Set up a working development environment as decribed on Compiling on Windows, including all prerequisites. Make sure that you're able to create an install package for OpenCPN succesfully. After that, compiling plugins and building install packages for the plugins is easy.
cd C:\Users\%username%\Sources git clone https://github.com/seandepagnier/watchdog_pi
cd C:\Users\%username%\Sources\watchdog_pi more README
cd C:\Users\%username%\Sources\watchdog_pi mkdir build cd build copy c:\Users\%username%\Sources\OpenCPN\build\release\opencpn.lib .
One should use the earliest version of opencpn.Lib possible that is still compatible with the Plugin API, according to the chart for Plugin API and OpenCPN Version Compatibility.
cd c:\Users\%username%\Sources\watchdog_pi\build cmake -T v141_xp .. cmake --build . cmake --build . --config release cmake --build . --config release --target package
If successful, CMake will return this message:
CPack: - package: **C:/Users/%username%/Sources/watchdog_pi/build/watchdog_pi-2.4.0-ov50-win32.exe** generated.
Execute this file to install the plugin via the mouse in the explorer, or by starting via the command line
C:/Users/%username%/Sources/watchdog_pi/build/watchdog_pi-2.4.0-ov50-win32.exe
Go through the installations steps, start OpenCPN and see if the plugin is available. Othwerwise have a look in the logfile.
Can the information below be removed or moved to a page for older versions? Currently there is NSIS 3.04 - KarmaSailor. 20191110
With NSIS 2.4.6 some registry tweaking was required. Go to “NSIS (Unicode) used to build the installation packages for OpenCPN and Plugins